﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InnovTech.Data.Proxy
{
    /// <summary>
    /// Describes a proxy object for a object's member.
    /// </summary>
    public class ObjectMemberProxy : ProxyBase, IObjectMemberProxy
    {

        ProxyObjectMemberType _memberType;


        public ObjectMemberProxy(string name, Type type, ProxyObjectMemberType memberType = ProxyObjectMemberType.Property)
            : base(name, type)
        {
            MemberType = memberType;
        }

        /// <summary>
        /// Gets the type of this object member
        /// </summary>
        public ProxyObjectMemberType MemberType
        {
            get { return _memberType; }
            protected set { _memberType = value; }
        }

        /// <summary>
        /// Gets or sets the value of this object member.
        /// </summary>
        public object Value{get;set;}
    }
}
